<h2>Preview</h2>

{% if fmt == "json" %}
<pre class="fetch-json" data-url="{{ url }}"></pre>

<p>JSON endpoint URL</p>
<input
    class="form-control"
    type="text" name=""
    value="{{ url }}" readonly>

{% else %}
<img src="{{ url }}">
<p>Badge URL</p>
<input
    class="form-control"
    type="text" name=""
    value="{{ url }}" readonly>
<p>HTML code</p>
<input
    class="form-control"
    type="text"
    name=""
    value="&lt;img src=&quot;{{ url }}&quot; alt=&quot;{{ label }}&quot;&gt;" readonly>
<p>Markdown code</p>
<input
    class="form-control"
    type="text"
    name=""
    value="![{{ label }}]({{ url }})" readonly>
{% endif %}